<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DeriveGeneric #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE GeneralizedNewtypeDeriving #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude #-}</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Module      :  Control.Applicative</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Copyright   :  Conor McBride and Ross Paterson 2005</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- License     :  BSD-style (see the LICENSE file in the distribution)</span><span>
</span><span id="line-11"></span><span class="hs-comment">--</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Stability   :  experimental</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- This module describes a structure intermediate between a functor and</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- a monad (technically, a strong lax monoidal functor).  Compared with</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- monads, this interface lacks the full power of the binding operation</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- '&gt;&gt;=', but</span><span>
</span><span id="line-20"></span><span class="hs-comment">--</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- * it has more instances.</span><span>
</span><span id="line-22"></span><span class="hs-comment">--</span><span>
</span><span id="line-23"></span><span class="hs-comment">-- * it is sufficient for many uses, e.g. context-free parsing, or the</span><span>
</span><span id="line-24"></span><span class="hs-comment">--   'Data.Traversable.Traversable' class.</span><span>
</span><span id="line-25"></span><span class="hs-comment">--</span><span>
</span><span id="line-26"></span><span class="hs-comment">-- * instances can perform analysis of computations before they are</span><span>
</span><span id="line-27"></span><span class="hs-comment">--   executed, and thus produce shared optimizations.</span><span>
</span><span id="line-28"></span><span class="hs-comment">--</span><span>
</span><span id="line-29"></span><span class="hs-comment">-- This interface was introduced for parsers by Niklas R&amp;#xF6;jemo, because</span><span>
</span><span id="line-30"></span><span class="hs-comment">-- it admits more sharing than the monadic interface.  The names here are</span><span>
</span><span id="line-31"></span><span class="hs-comment">-- mostly based on parsing work by Doaitse Swierstra.</span><span>
</span><span id="line-32"></span><span class="hs-comment">--</span><span>
</span><span id="line-33"></span><span class="hs-comment">-- For more details, see</span><span>
</span><span id="line-34"></span><span class="hs-comment">-- &lt;http://www.soi.city.ac.uk/~ross/papers/Applicative.html Applicative Programming with Effects&gt;,</span><span>
</span><span id="line-35"></span><span class="hs-comment">-- by Conor McBride and Ross Paterson.</span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Control.Applicative</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-38"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Applicative functors</span></span><span>
</span><span id="line-39"></span><span>    </span><span class="annot"><a href="GHC.Base.html#Applicative"><span class="hs-identifier">Applicative</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Alternatives</span></span><span>
</span><span id="line-41"></span><span>    </span><span class="annot"><a href="GHC.Base.html#Alternative"><span class="hs-identifier">Alternative</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Instances</span></span><span>
</span><span id="line-43"></span><span>    </span><span class="annot"><a href="Data.Functor.Const.html#Const"><span class="hs-identifier">Const</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Control.Applicative.html#WrappedMonad"><span class="hs-identifier">WrappedMonad</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Control.Applicative.html#WrappedArrow"><span class="hs-identifier">WrappedArrow</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Control.Applicative.html#ZipList"><span class="hs-identifier">ZipList</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Utility functions</span></span><span>
</span><span id="line-45"></span><span>    </span><span class="annot"><a href="Data.Functor.html#%3C%24%3E"><span class="hs-operator">(&lt;$&gt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#%3C%24"><span class="hs-operator">(&lt;$)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#%3C%2A%2A%3E"><span class="hs-operator">(&lt;**&gt;)</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>    </span><span class="annot"><a href="GHC.Base.html#liftA"><span class="hs-identifier">liftA</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#liftA3"><span class="hs-identifier">liftA3</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>    </span><span class="annot"><a href="Control.Applicative.html#optional"><span class="hs-identifier">optional</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-48"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Category.html"><span class="hs-identifier">Control.Category</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Category.html#."><span class="hs-operator">(.)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Control.Category.html#id"><span class="hs-identifier">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Arrow.html"><span class="hs-identifier">Control.Arrow</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Maybe.html"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Tuple.html"><span class="hs-identifier">Data.Tuple</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Eq.html"><span class="hs-identifier">Data.Eq</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Ord.html"><span class="hs-identifier">Data.Ord</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Foldable.html"><span class="hs-identifier">Data.Foldable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Foldable.html#Foldable"><span class="hs-identifier">Foldable</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Functor.html"><span class="hs-identifier">Data.Functor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.html#%3C%24%3E"><span class="hs-operator">(&lt;$&gt;)</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Functor.Const.html"><span class="hs-identifier">Data.Functor.Const</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Const.html#Const"><span class="hs-identifier">Const</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-59"></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Generics.html"><span class="hs-identifier">GHC.Generics</span></a></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.List.html"><span class="hs-identifier">GHC.List</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.List.html#repeat"><span class="hs-identifier">repeat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#zipWith"><span class="hs-identifier">zipWith</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#drop"><span class="hs-identifier">drop</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Read.html"><span class="hs-identifier">GHC.Read</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Read.html#Read"><span class="hs-identifier">Read</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Show.html"><span class="hs-identifier">GHC.Show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier">Show</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span id="local-6989586621679559413"><span id="local-6989586621679559414"><span id="local-6989586621679559415"><span id="local-6989586621679559416"></span></span></span></span><span class="hs-keyword">newtype</span><span> </span><span id="WrappedMonad"><span class="annot"><a href="Control.Applicative.html#WrappedMonad"><span class="hs-identifier hs-var">WrappedMonad</span></a></span></span><span> </span><span id="local-6989586621679559675"><span class="annot"><a href="#local-6989586621679559675"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span id="local-6989586621679559674"><span class="annot"><a href="#local-6989586621679559674"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="WrapMonad"><span class="annot"><a href="Control.Applicative.html#WrapMonad"><span class="hs-identifier hs-var">WrapMonad</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="unwrapMonad"><span class="annot"><span class="annottext">forall (m :: * -&gt; *) a. WrappedMonad m a -&gt; m a
</span><a href="Control.Applicative.html#unwrapMonad"><span class="hs-identifier hs-var hs-var">unwrapMonad</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679559675"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559674"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-67"></span><span>                         </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">(forall x. WrappedMonad m a -&gt; Rep (WrappedMonad m a) x)
-&gt; (forall x. Rep (WrappedMonad m a) x -&gt; WrappedMonad m a)
-&gt; Generic (WrappedMonad m a)
forall x. Rep (WrappedMonad m a) x -&gt; WrappedMonad m a
forall x. WrappedMonad m a -&gt; Rep (WrappedMonad m a) x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
forall (m :: * -&gt; *) a x.
Rep (WrappedMonad m a) x -&gt; WrappedMonad m a
forall (m :: * -&gt; *) a x.
WrappedMonad m a -&gt; Rep (WrappedMonad m a) x
$cto :: forall (m :: * -&gt; *) a x.
Rep (WrappedMonad m a) x -&gt; WrappedMonad m a
$cfrom :: forall (m :: * -&gt; *) a x.
WrappedMonad m a -&gt; Rep (WrappedMonad m a) x
</span><a href="GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span>  </span><span class="hs-comment">-- ^ @since 4.7.0.0</span><span>
</span><span id="line-68"></span><span>                                  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall a. WrappedMonad m a -&gt; Rep1 (WrappedMonad m) a)
-&gt; (forall a. Rep1 (WrappedMonad m) a -&gt; WrappedMonad m a)
-&gt; Generic1 (WrappedMonad m)
forall a. Rep1 (WrappedMonad m) a -&gt; WrappedMonad m a
forall a. WrappedMonad m a -&gt; Rep1 (WrappedMonad m) a
forall k (f :: k -&gt; *).
(forall (a :: k). f a -&gt; Rep1 f a)
-&gt; (forall (a :: k). Rep1 f a -&gt; f a) -&gt; Generic1 f
forall (m :: * -&gt; *) a. Rep1 (WrappedMonad m) a -&gt; WrappedMonad m a
forall (m :: * -&gt; *) a. WrappedMonad m a -&gt; Rep1 (WrappedMonad m) a
$cto1 :: forall (m :: * -&gt; *) a. Rep1 (WrappedMonad m) a -&gt; WrappedMonad m a
$cfrom1 :: forall (m :: * -&gt; *) a. WrappedMonad m a -&gt; Rep1 (WrappedMonad m) a
</span><a href="GHC.Generics.html#Generic1"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic1</span></a></span><span> </span><span class="hs-comment">-- ^ @since 4.7.0.0</span><span>
</span><span id="line-69"></span><span>                                  </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679559390"><span id="local-6989586621679559394"><span id="local-6989586621679559398"><span class="annot"><span class="annottext">Applicative (WrappedMonad m)
Applicative (WrappedMonad m)
-&gt; (forall a b.
    WrappedMonad m a -&gt; (a -&gt; WrappedMonad m b) -&gt; WrappedMonad m b)
-&gt; (forall a b.
    WrappedMonad m a -&gt; WrappedMonad m b -&gt; WrappedMonad m b)
-&gt; (forall a. a -&gt; WrappedMonad m a)
-&gt; Monad (WrappedMonad m)
forall a. a -&gt; WrappedMonad m a
forall a b.
WrappedMonad m a -&gt; WrappedMonad m b -&gt; WrappedMonad m b
forall a b.
WrappedMonad m a -&gt; (a -&gt; WrappedMonad m b) -&gt; WrappedMonad m b
forall {m :: * -&gt; *}. Monad m =&gt; Applicative (WrappedMonad m)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; WrappedMonad m a
forall (m :: * -&gt; *) a b.
Monad m =&gt;
WrappedMonad m a -&gt; WrappedMonad m b -&gt; WrappedMonad m b
forall (m :: * -&gt; *) a b.
Monad m =&gt;
WrappedMonad m a -&gt; (a -&gt; WrappedMonad m b) -&gt; WrappedMonad m b
forall (m :: * -&gt; *).
Applicative m
-&gt; (forall a b. m a -&gt; (a -&gt; m b) -&gt; m b)
-&gt; (forall a b. m a -&gt; m b -&gt; m b)
-&gt; (forall a. a -&gt; m a)
-&gt; Monad m
return :: forall a. a -&gt; WrappedMonad m a
$creturn :: forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; WrappedMonad m a
&gt;&gt; :: forall a b.
WrappedMonad m a -&gt; WrappedMonad m b -&gt; WrappedMonad m b
$c&gt;&gt; :: forall (m :: * -&gt; *) a b.
Monad m =&gt;
WrappedMonad m a -&gt; WrappedMonad m b -&gt; WrappedMonad m b
&gt;&gt;= :: forall a b.
WrappedMonad m a -&gt; (a -&gt; WrappedMonad m b) -&gt; WrappedMonad m b
$c&gt;&gt;= :: forall (m :: * -&gt; *) a b.
Monad m =&gt;
WrappedMonad m a -&gt; (a -&gt; WrappedMonad m b) -&gt; WrappedMonad m b
</span><a href="GHC.Base.html#Monad"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Monad</span></a></span></span></span></span><span>    </span><span class="hs-comment">-- ^ @since 4.7.0.0</span><span>
</span><span id="line-70"></span><span>                                  </span><span class="hs-special">)</span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-73"></span><span id="local-6989586621679559651"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679559383"><span class="annot"><a href="GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559651"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Applicative.html#WrappedMonad"><span class="hs-identifier hs-type">WrappedMonad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559651"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-74"></span><span>    </span><span id="local-6989586621679559380"><span class="annot"><span class="annottext">fmap :: forall a b. (a -&gt; b) -&gt; WrappedMonad m a -&gt; WrappedMonad m b
</span><a href="GHC.Base.html#fmap"><span class="hs-identifier hs-var hs-var hs-var hs-var">fmap</span></a></span></span><span> </span><span id="local-6989586621679559379"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679559379"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Applicative.html#WrapMonad"><span class="hs-identifier hs-type">WrapMonad</span></a></span><span> </span><span id="local-6989586621679559378"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679559378"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m b -&gt; WrappedMonad m b
forall (m :: * -&gt; *) a. m a -&gt; WrappedMonad m a
</span><a href="Control.Applicative.html#WrapMonad"><span class="hs-identifier hs-var">WrapMonad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; m a -&gt; m b
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679559379"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679559378"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-77"></span><span id="local-6989586621679559376"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679559367"><span id="local-6989586621679559369"><span class="annot"><a href="GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559376"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Applicative.html#WrappedMonad"><span class="hs-identifier hs-type">WrappedMonad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559376"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-78"></span><span>    </span><span id="local-6989586621679559364"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; WrappedMonad m a
</span><a href="GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; WrappedMonad m a
forall (m :: * -&gt; *) a. m a -&gt; WrappedMonad m a
</span><a href="Control.Applicative.html#WrapMonad"><span class="hs-identifier hs-var">WrapMonad</span></a></span><span> </span><span class="annot"><span class="annottext">(m a -&gt; WrappedMonad m a) -&gt; (a -&gt; m a) -&gt; a -&gt; WrappedMonad m a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; m a
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span>
</span><span id="line-79"></span><span>    </span><span class="annot"><a href="Control.Applicative.html#WrapMonad"><span class="hs-identifier hs-type">WrapMonad</span></a></span><span> </span><span id="local-6989586621679559361"><span class="annot"><span class="annottext">m (a -&gt; b)
</span><a href="#local-6989586621679559361"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679559360"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b.
WrappedMonad m (a -&gt; b) -&gt; WrappedMonad m a -&gt; WrappedMonad m b
</span><a href="GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;*&gt;</span></a></span></span><span> </span><span class="annot"><a href="Control.Applicative.html#WrapMonad"><span class="hs-identifier hs-type">WrapMonad</span></a></span><span> </span><span id="local-6989586621679559359"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679559359"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m b -&gt; WrappedMonad m b
forall (m :: * -&gt; *) a. m a -&gt; WrappedMonad m a
</span><a href="Control.Applicative.html#WrapMonad"><span class="hs-identifier hs-var">WrapMonad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">m (a -&gt; b)
</span><a href="#local-6989586621679559361"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">m (a -&gt; b) -&gt; m a -&gt; m b
forall (m :: * -&gt; *) a b. Monad m =&gt; m (a -&gt; b) -&gt; m a -&gt; m b
</span><a href="GHC.Base.html#ap"><span class="hs-operator hs-var">`ap`</span></a></span><span> </span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679559359"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-80"></span><span>    </span><span id="local-6989586621679559356"><span class="annot"><span class="annottext">liftA2 :: forall a b c.
(a -&gt; b -&gt; c)
-&gt; WrappedMonad m a -&gt; WrappedMonad m b -&gt; WrappedMonad m c
</span><a href="GHC.Base.html#liftA2"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftA2</span></a></span></span><span> </span><span id="local-6989586621679559354"><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679559354"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Applicative.html#WrapMonad"><span class="hs-identifier hs-type">WrapMonad</span></a></span><span> </span><span id="local-6989586621679559353"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679559353"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Applicative.html#WrapMonad"><span class="hs-identifier hs-type">WrapMonad</span></a></span><span> </span><span id="local-6989586621679559352"><span class="annot"><span class="annottext">m b
</span><a href="#local-6989586621679559352"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m c -&gt; WrappedMonad m c
forall (m :: * -&gt; *) a. m a -&gt; WrappedMonad m a
</span><a href="Control.Applicative.html#WrapMonad"><span class="hs-identifier hs-var">WrapMonad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; m a -&gt; m b -&gt; m c
forall (m :: * -&gt; *) a1 a2 r.
Monad m =&gt;
(a1 -&gt; a2 -&gt; r) -&gt; m a1 -&gt; m a2 -&gt; m r
</span><a href="GHC.Base.html#liftM2"><span class="hs-identifier hs-var">liftM2</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679559354"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679559353"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">m b
</span><a href="#local-6989586621679559352"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-83"></span><span id="local-6989586621679559613"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679559343"><span id="local-6989586621679559345"><span class="annot"><a href="GHC.Base.html#MonadPlus"><span class="hs-identifier hs-type">MonadPlus</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559613"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Applicative.html#WrappedMonad"><span class="hs-identifier hs-type">WrappedMonad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559613"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-84"></span><span>    </span><span id="local-6989586621679559340"><span class="annot"><span class="annottext">empty :: forall a. WrappedMonad m a
</span><a href="GHC.Base.html#empty"><span class="hs-identifier hs-var hs-var hs-var hs-var">empty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; WrappedMonad m a
forall (m :: * -&gt; *) a. m a -&gt; WrappedMonad m a
</span><a href="Control.Applicative.html#WrapMonad"><span class="hs-identifier hs-var">WrapMonad</span></a></span><span> </span><span class="annot"><span class="annottext">m a
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a
</span><a href="GHC.Base.html#mzero"><span class="hs-identifier hs-var">mzero</span></a></span><span>
</span><span id="line-85"></span><span>    </span><span class="annot"><a href="Control.Applicative.html#WrapMonad"><span class="hs-identifier hs-type">WrapMonad</span></a></span><span> </span><span id="local-6989586621679559336"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679559336"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span id="local-6989586621679559335"><span class="annot"><span class="annottext">&lt;|&gt; :: forall a. WrappedMonad m a -&gt; WrappedMonad m a -&gt; WrappedMonad m a
</span><a href="GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;|&gt;</span></a></span></span><span> </span><span class="annot"><a href="Control.Applicative.html#WrapMonad"><span class="hs-identifier hs-type">WrapMonad</span></a></span><span> </span><span id="local-6989586621679559333"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679559333"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; WrappedMonad m a
forall (m :: * -&gt; *) a. m a -&gt; WrappedMonad m a
</span><a href="Control.Applicative.html#WrapMonad"><span class="hs-identifier hs-var">WrapMonad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679559336"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">m a -&gt; m a -&gt; m a
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a -&gt; m a -&gt; m a
</span><a href="GHC.Base.html#mplus"><span class="hs-operator hs-var">`mplus`</span></a></span><span> </span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679559333"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span id="local-6989586621679559328"><span id="local-6989586621679559329"><span id="local-6989586621679559330"><span id="local-6989586621679559331"></span></span></span></span><span class="hs-keyword">newtype</span><span> </span><span id="WrappedArrow"><span class="annot"><a href="Control.Applicative.html#WrappedArrow"><span class="hs-identifier hs-var">WrappedArrow</span></a></span></span><span> </span><span id="local-6989586621679559603"><span class="annot"><a href="#local-6989586621679559603"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span id="local-6989586621679559602"><span class="annot"><a href="#local-6989586621679559602"><span class="hs-identifier hs-type">b</span></a></span></span><span> </span><span id="local-6989586621679559601"><span class="annot"><a href="#local-6989586621679559601"><span class="hs-identifier hs-type">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="WrapArrow"><span class="annot"><a href="Control.Applicative.html#WrapArrow"><span class="hs-identifier hs-var">WrapArrow</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="unwrapArrow"><span class="annot"><span class="annottext">forall (a :: * -&gt; * -&gt; *) b c. WrappedArrow a b c -&gt; a b c
</span><a href="Control.Applicative.html#unwrapArrow"><span class="hs-identifier hs-var hs-var">unwrapArrow</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679559603"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559602"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559601"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-88"></span><span>                           </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">(forall x. WrappedArrow a b c -&gt; Rep (WrappedArrow a b c) x)
-&gt; (forall x. Rep (WrappedArrow a b c) x -&gt; WrappedArrow a b c)
-&gt; Generic (WrappedArrow a b c)
forall x. Rep (WrappedArrow a b c) x -&gt; WrappedArrow a b c
forall x. WrappedArrow a b c -&gt; Rep (WrappedArrow a b c) x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
forall (a :: * -&gt; * -&gt; *) b c x.
Rep (WrappedArrow a b c) x -&gt; WrappedArrow a b c
forall (a :: * -&gt; * -&gt; *) b c x.
WrappedArrow a b c -&gt; Rep (WrappedArrow a b c) x
$cto :: forall (a :: * -&gt; * -&gt; *) b c x.
Rep (WrappedArrow a b c) x -&gt; WrappedArrow a b c
$cfrom :: forall (a :: * -&gt; * -&gt; *) b c x.
WrappedArrow a b c -&gt; Rep (WrappedArrow a b c) x
</span><a href="GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span>  </span><span class="hs-comment">-- ^ @since 4.7.0.0</span><span>
</span><span id="line-89"></span><span>                                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall a. WrappedArrow a b a -&gt; Rep1 (WrappedArrow a b) a)
-&gt; (forall a. Rep1 (WrappedArrow a b) a -&gt; WrappedArrow a b a)
-&gt; Generic1 (WrappedArrow a b)
forall a. Rep1 (WrappedArrow a b) a -&gt; WrappedArrow a b a
forall a. WrappedArrow a b a -&gt; Rep1 (WrappedArrow a b) a
forall k (f :: k -&gt; *).
(forall (a :: k). f a -&gt; Rep1 f a)
-&gt; (forall (a :: k). Rep1 f a -&gt; f a) -&gt; Generic1 f
forall (a :: * -&gt; * -&gt; *) b a.
Rep1 (WrappedArrow a b) a -&gt; WrappedArrow a b a
forall (a :: * -&gt; * -&gt; *) b a.
WrappedArrow a b a -&gt; Rep1 (WrappedArrow a b) a
$cto1 :: forall (a :: * -&gt; * -&gt; *) b a.
Rep1 (WrappedArrow a b) a -&gt; WrappedArrow a b a
$cfrom1 :: forall (a :: * -&gt; * -&gt; *) b a.
WrappedArrow a b a -&gt; Rep1 (WrappedArrow a b) a
</span><a href="GHC.Generics.html#Generic1"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic1</span></a></span><span> </span><span class="hs-comment">-- ^ @since 4.7.0.0</span><span>
</span><span id="line-90"></span><span>                                    </span><span class="hs-special">)</span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-93"></span><span id="local-6989586621679559596"><span id="local-6989586621679559597"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679559317"><span class="annot"><a href="Control.Arrow.html#Arrow"><span class="hs-identifier hs-type">Arrow</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559597"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Applicative.html#WrappedArrow"><span class="hs-identifier hs-type">WrappedArrow</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559597"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559596"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-94"></span><span>    </span><span id="local-6989586621679559314"><span class="annot"><span class="annottext">fmap :: forall a b. (a -&gt; b) -&gt; WrappedArrow a b a -&gt; WrappedArrow a b b
</span><a href="GHC.Base.html#fmap"><span class="hs-identifier hs-var hs-var hs-var hs-var">fmap</span></a></span></span><span> </span><span id="local-6989586621679559313"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679559313"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Applicative.html#WrapArrow"><span class="hs-identifier hs-type">WrapArrow</span></a></span><span> </span><span id="local-6989586621679559312"><span class="annot"><span class="annottext">a b a
</span><a href="#local-6989586621679559312"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a b b -&gt; WrappedArrow a b b
forall (a :: * -&gt; * -&gt; *) b c. a b c -&gt; WrappedArrow a b c
</span><a href="Control.Applicative.html#WrapArrow"><span class="hs-identifier hs-var">WrapArrow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a b a
</span><a href="#local-6989586621679559312"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a b a -&gt; a a b -&gt; a b b
forall {k} (cat :: k -&gt; k -&gt; *) (a :: k) (b :: k) (c :: k).
Category cat =&gt;
cat a b -&gt; cat b c -&gt; cat a c
</span><a href="Control.Category.html#%3E%3E%3E"><span class="hs-operator hs-var">&gt;&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; a a b
forall (a :: * -&gt; * -&gt; *) b c. Arrow a =&gt; (b -&gt; c) -&gt; a b c
</span><a href="Control.Arrow.html#arr"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679559313"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-97"></span><span id="local-6989586621679559584"><span id="local-6989586621679559585"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679559301"><span id="local-6989586621679559303"><span id="local-6989586621679559306"><span class="annot"><a href="Control.Arrow.html#Arrow"><span class="hs-identifier hs-type">Arrow</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559585"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Applicative.html#WrappedArrow"><span class="hs-identifier hs-type">WrappedArrow</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559585"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559584"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-98"></span><span>    </span><span id="local-6989586621679559299"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; WrappedArrow a b a
</span><a href="GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621679559298"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679559298"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a b a -&gt; WrappedArrow a b a
forall (a :: * -&gt; * -&gt; *) b c. a b c -&gt; WrappedArrow a b c
</span><a href="Control.Applicative.html#WrapArrow"><span class="hs-identifier hs-var">WrapArrow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(b -&gt; a) -&gt; a b a
forall (a :: * -&gt; * -&gt; *) b c. Arrow a =&gt; (b -&gt; c) -&gt; a b c
</span><a href="Control.Arrow.html#arr"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; b -&gt; a
forall a b. a -&gt; b -&gt; a
</span><a href="GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679559298"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-99"></span><span>    </span><span id="local-6989586621679559293"><span class="annot"><span class="annottext">liftA2 :: forall a b c.
(a -&gt; b -&gt; c)
-&gt; WrappedArrow a b a -&gt; WrappedArrow a b b -&gt; WrappedArrow a b c
</span><a href="#local-6989586621679559293"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftA2</span></a></span></span><span> </span><span id="local-6989586621679559292"><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679559292"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Applicative.html#WrapArrow"><span class="hs-identifier hs-type">WrapArrow</span></a></span><span> </span><span id="local-6989586621679559291"><span class="annot"><span class="annottext">a b a
</span><a href="#local-6989586621679559291"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Applicative.html#WrapArrow"><span class="hs-identifier hs-type">WrapArrow</span></a></span><span> </span><span id="local-6989586621679559290"><span class="annot"><span class="annottext">a b b
</span><a href="#local-6989586621679559290"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-100"></span><span>      </span><span class="annot"><span class="annottext">a b c -&gt; WrappedArrow a b c
forall (a :: * -&gt; * -&gt; *) b c. a b c -&gt; WrappedArrow a b c
</span><a href="Control.Applicative.html#WrapArrow"><span class="hs-identifier hs-var">WrapArrow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a b a
</span><a href="#local-6989586621679559291"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">a b a -&gt; a b b -&gt; a b (a, b)
forall (a :: * -&gt; * -&gt; *) b c c'.
Arrow a =&gt;
a b c -&gt; a b c' -&gt; a b (c, c')
</span><a href="Control.Arrow.html#%26%26%26"><span class="hs-operator hs-var">&amp;&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">a b b
</span><a href="#local-6989586621679559290"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">a b (a, b) -&gt; a (a, b) c -&gt; a b c
forall {k} (cat :: k -&gt; k -&gt; *) (a :: k) (b :: k) (c :: k).
Category cat =&gt;
cat a b -&gt; cat b c -&gt; cat a c
</span><a href="Control.Category.html#%3E%3E%3E"><span class="hs-operator hs-var">&gt;&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">((a, b) -&gt; c) -&gt; a (a, b) c
forall (a :: * -&gt; * -&gt; *) b c. Arrow a =&gt; (b -&gt; c) -&gt; a b c
</span><a href="Control.Arrow.html#arr"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; (a, b) -&gt; c
forall a b c. (a -&gt; b -&gt; c) -&gt; (a, b) -&gt; c
</span><a href="Data.Tuple.html#uncurry"><span class="hs-identifier hs-var">uncurry</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679559292"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span></span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-103"></span><span id="local-6989586621679559569"><span id="local-6989586621679559570"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679559280"><span id="local-6989586621679559282"><span class="hs-special">(</span><span class="annot"><a href="Control.Arrow.html#ArrowZero"><span class="hs-identifier hs-type">ArrowZero</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559570"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Control.Arrow.html#ArrowPlus"><span class="hs-identifier hs-type">ArrowPlus</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559570"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Applicative.html#WrappedArrow"><span class="hs-identifier hs-type">WrappedArrow</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559570"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559569"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-104"></span><span>    </span><span id="local-6989586621679559278"><span class="annot"><span class="annottext">empty :: forall a. WrappedArrow a b a
</span><a href="#local-6989586621679559278"><span class="hs-identifier hs-var hs-var hs-var hs-var">empty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a b a -&gt; WrappedArrow a b a
forall (a :: * -&gt; * -&gt; *) b c. a b c -&gt; WrappedArrow a b c
</span><a href="Control.Applicative.html#WrapArrow"><span class="hs-identifier hs-var">WrapArrow</span></a></span><span> </span><span class="annot"><span class="annottext">a b a
forall (a :: * -&gt; * -&gt; *) b c. ArrowZero a =&gt; a b c
</span><a href="Control.Arrow.html#zeroArrow"><span class="hs-identifier hs-var">zeroArrow</span></a></span><span>
</span><span id="line-105"></span><span>    </span><span class="annot"><a href="Control.Applicative.html#WrapArrow"><span class="hs-identifier hs-type">WrapArrow</span></a></span><span> </span><span id="local-6989586621679559275"><span class="annot"><span class="annottext">a b a
</span><a href="#local-6989586621679559275"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span id="local-6989586621679559274"><span class="annot"><span class="annottext">&lt;|&gt; :: forall a.
WrappedArrow a b a -&gt; WrappedArrow a b a -&gt; WrappedArrow a b a
</span><a href="#local-6989586621679559274"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;|&gt;</span></a></span></span><span> </span><span class="annot"><a href="Control.Applicative.html#WrapArrow"><span class="hs-identifier hs-type">WrapArrow</span></a></span><span> </span><span id="local-6989586621679559273"><span class="annot"><span class="annottext">a b a
</span><a href="#local-6989586621679559273"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a b a -&gt; WrappedArrow a b a
forall (a :: * -&gt; * -&gt; *) b c. a b c -&gt; WrappedArrow a b c
</span><a href="Control.Applicative.html#WrapArrow"><span class="hs-identifier hs-var">WrapArrow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a b a
</span><a href="#local-6989586621679559275"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">a b a -&gt; a b a -&gt; a b a
forall (a :: * -&gt; * -&gt; *) b c.
ArrowPlus a =&gt;
a b c -&gt; a b c -&gt; a b c
</span><a href="Control.Arrow.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a b a
</span><a href="#local-6989586621679559273"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-106"></span><span>
</span><span id="line-107"></span><span class="hs-comment">-- | Lists, but with an 'Applicative' functor based on zipping.</span><span>
</span><span id="line-108"></span><span id="local-6989586621679559268"><span id="local-6989586621679559269"><span id="local-6989586621679559270"><span id="local-6989586621679559271"></span></span></span></span><span class="hs-keyword">newtype</span><span> </span><span id="ZipList"><span class="annot"><a href="Control.Applicative.html#ZipList"><span class="hs-identifier hs-var">ZipList</span></a></span></span><span> </span><span id="local-6989586621679559560"><span class="annot"><a href="#local-6989586621679559560"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="ZipList"><span class="annot"><a href="Control.Applicative.html#ZipList"><span class="hs-identifier hs-var">ZipList</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="getZipList"><span class="annot"><span class="annottext">forall a. ZipList a -&gt; [a]
</span><a href="Control.Applicative.html#getZipList"><span class="hs-identifier hs-var hs-var">getZipList</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679559560"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-109"></span><span>                  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span id="local-6989586621679559256"><span id="local-6989586621679559258"><span id="local-6989586621679559264"><span class="annot"><span class="annottext">Int -&gt; ZipList a -&gt; ShowS
[ZipList a] -&gt; ShowS
ZipList a -&gt; String
(Int -&gt; ZipList a -&gt; ShowS)
-&gt; (ZipList a -&gt; String)
-&gt; ([ZipList a] -&gt; ShowS)
-&gt; Show (ZipList a)
forall a. Show a =&gt; Int -&gt; ZipList a -&gt; ShowS
forall a. Show a =&gt; [ZipList a] -&gt; ShowS
forall a. Show a =&gt; ZipList a -&gt; String
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [ZipList a] -&gt; ShowS
$cshowList :: forall a. Show a =&gt; [ZipList a] -&gt; ShowS
show :: ZipList a -&gt; String
$cshow :: forall a. Show a =&gt; ZipList a -&gt; String
showsPrec :: Int -&gt; ZipList a -&gt; ShowS
$cshowsPrec :: forall a. Show a =&gt; Int -&gt; ZipList a -&gt; ShowS
</span><a href="GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span>     </span><span class="hs-comment">-- ^ @since 4.7.0.0</span><span>
</span><span id="line-110"></span><span>                           </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679559247"><span id="local-6989586621679559252"><span class="annot"><span class="annottext">ZipList a -&gt; ZipList a -&gt; Bool
(ZipList a -&gt; ZipList a -&gt; Bool)
-&gt; (ZipList a -&gt; ZipList a -&gt; Bool) -&gt; Eq (ZipList a)
forall a. Eq a =&gt; ZipList a -&gt; ZipList a -&gt; Bool
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: ZipList a -&gt; ZipList a -&gt; Bool
$c/= :: forall a. Eq a =&gt; ZipList a -&gt; ZipList a -&gt; Bool
== :: ZipList a -&gt; ZipList a -&gt; Bool
$c== :: forall a. Eq a =&gt; ZipList a -&gt; ZipList a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></a></span></span></span><span>       </span><span class="hs-comment">-- ^ @since 4.7.0.0</span><span>
</span><span id="line-111"></span><span>                           </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679559212"><span id="local-6989586621679559216"><span id="local-6989586621679559220"><span id="local-6989586621679559224"><span id="local-6989586621679559228"><span id="local-6989586621679559232"><span id="local-6989586621679559237"><span class="annot"><span class="annottext">Eq (ZipList a)
Eq (ZipList a)
-&gt; (ZipList a -&gt; ZipList a -&gt; Ordering)
-&gt; (ZipList a -&gt; ZipList a -&gt; Bool)
-&gt; (ZipList a -&gt; ZipList a -&gt; Bool)
-&gt; (ZipList a -&gt; ZipList a -&gt; Bool)
-&gt; (ZipList a -&gt; ZipList a -&gt; Bool)
-&gt; (ZipList a -&gt; ZipList a -&gt; ZipList a)
-&gt; (ZipList a -&gt; ZipList a -&gt; ZipList a)
-&gt; Ord (ZipList a)
ZipList a -&gt; ZipList a -&gt; Bool
ZipList a -&gt; ZipList a -&gt; Ordering
ZipList a -&gt; ZipList a -&gt; ZipList a
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
forall {a}. Ord a =&gt; Eq (ZipList a)
forall a. Ord a =&gt; ZipList a -&gt; ZipList a -&gt; Bool
forall a. Ord a =&gt; ZipList a -&gt; ZipList a -&gt; Ordering
forall a. Ord a =&gt; ZipList a -&gt; ZipList a -&gt; ZipList a
min :: ZipList a -&gt; ZipList a -&gt; ZipList a
$cmin :: forall a. Ord a =&gt; ZipList a -&gt; ZipList a -&gt; ZipList a
max :: ZipList a -&gt; ZipList a -&gt; ZipList a
$cmax :: forall a. Ord a =&gt; ZipList a -&gt; ZipList a -&gt; ZipList a
&gt;= :: ZipList a -&gt; ZipList a -&gt; Bool
$c&gt;= :: forall a. Ord a =&gt; ZipList a -&gt; ZipList a -&gt; Bool
&gt; :: ZipList a -&gt; ZipList a -&gt; Bool
$c&gt; :: forall a. Ord a =&gt; ZipList a -&gt; ZipList a -&gt; Bool
&lt;= :: ZipList a -&gt; ZipList a -&gt; Bool
$c&lt;= :: forall a. Ord a =&gt; ZipList a -&gt; ZipList a -&gt; Bool
&lt; :: ZipList a -&gt; ZipList a -&gt; Bool
$c&lt; :: forall a. Ord a =&gt; ZipList a -&gt; ZipList a -&gt; Bool
compare :: ZipList a -&gt; ZipList a -&gt; Ordering
$ccompare :: forall a. Ord a =&gt; ZipList a -&gt; ZipList a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></a></span></span></span></span></span></span></span></span><span>      </span><span class="hs-comment">-- ^ @since 4.7.0.0</span><span>
</span><span id="line-112"></span><span>                           </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679559190"><span id="local-6989586621679559200"><span id="local-6989586621679559203"><span id="local-6989586621679559205"><span class="annot"><span class="annottext">ReadPrec [ZipList a]
ReadPrec (ZipList a)
Int -&gt; ReadS (ZipList a)
ReadS [ZipList a]
(Int -&gt; ReadS (ZipList a))
-&gt; ReadS [ZipList a]
-&gt; ReadPrec (ZipList a)
-&gt; ReadPrec [ZipList a]
-&gt; Read (ZipList a)
forall a. Read a =&gt; ReadPrec [ZipList a]
forall a. Read a =&gt; ReadPrec (ZipList a)
forall a. Read a =&gt; Int -&gt; ReadS (ZipList a)
forall a. Read a =&gt; ReadS [ZipList a]
forall a.
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; ReadPrec a -&gt; ReadPrec [a] -&gt; Read a
readListPrec :: ReadPrec [ZipList a]
$creadListPrec :: forall a. Read a =&gt; ReadPrec [ZipList a]
readPrec :: ReadPrec (ZipList a)
$creadPrec :: forall a. Read a =&gt; ReadPrec (ZipList a)
readList :: ReadS [ZipList a]
$creadList :: forall a. Read a =&gt; ReadS [ZipList a]
readsPrec :: Int -&gt; ReadS (ZipList a)
$creadsPrec :: forall a. Read a =&gt; Int -&gt; ReadS (ZipList a)
</span><a href="GHC.Read.html#Read"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Read</span></a></span></span></span></span></span><span>     </span><span class="hs-comment">-- ^ @since 4.7.0.0</span><span>
</span><span id="line-113"></span><span>                           </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679559181"><span id="local-6989586621679559186"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; ZipList a -&gt; ZipList b)
-&gt; (forall a b. a -&gt; ZipList b -&gt; ZipList a) -&gt; Functor ZipList
forall a b. a -&gt; ZipList b -&gt; ZipList a
forall a b. (a -&gt; b) -&gt; ZipList a -&gt; ZipList b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; ZipList b -&gt; ZipList a
$c&lt;$ :: forall a b. a -&gt; ZipList b -&gt; ZipList a
fmap :: forall a b. (a -&gt; b) -&gt; ZipList a -&gt; ZipList b
$cfmap :: forall a b. (a -&gt; b) -&gt; ZipList a -&gt; ZipList b
</span><a href="GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span>  </span><span class="hs-comment">-- ^ @since 2.01</span><span>
</span><span id="line-114"></span><span>                           </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679559081"><span id="local-6989586621679559089"><span id="local-6989586621679559097"><span id="local-6989586621679559105"><span id="local-6989586621679559113"><span id="local-6989586621679559119"><span id="local-6989586621679559123"><span id="local-6989586621679559127"><span id="local-6989586621679559131"><span id="local-6989586621679559135"><span id="local-6989586621679559139"><span id="local-6989586621679559143"><span id="local-6989586621679559147"><span id="local-6989586621679559151"><span id="local-6989586621679559157"><span id="local-6989586621679559165"><span id="local-6989586621679559174"><span class="annot"><span class="annottext">(forall m. Monoid m =&gt; ZipList m -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; ZipList a -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; ZipList a -&gt; m)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; ZipList a -&gt; b)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; ZipList a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; ZipList a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; ZipList a -&gt; b)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; ZipList a -&gt; a)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; ZipList a -&gt; a)
-&gt; (forall a. ZipList a -&gt; [a])
-&gt; (forall a. ZipList a -&gt; Bool)
-&gt; (forall a. ZipList a -&gt; Int)
-&gt; (forall a. Eq a =&gt; a -&gt; ZipList a -&gt; Bool)
-&gt; (forall a. Ord a =&gt; ZipList a -&gt; a)
-&gt; (forall a. Ord a =&gt; ZipList a -&gt; a)
-&gt; (forall a. Num a =&gt; ZipList a -&gt; a)
-&gt; (forall a. Num a =&gt; ZipList a -&gt; a)
-&gt; Foldable ZipList
forall a. Eq a =&gt; a -&gt; ZipList a -&gt; Bool
forall a. Num a =&gt; ZipList a -&gt; a
forall a. Ord a =&gt; ZipList a -&gt; a
forall m. Monoid m =&gt; ZipList m -&gt; m
forall a. ZipList a -&gt; Bool
forall a. ZipList a -&gt; Int
forall a. ZipList a -&gt; [a]
forall a. (a -&gt; a -&gt; a) -&gt; ZipList a -&gt; a
forall m a. Monoid m =&gt; (a -&gt; m) -&gt; ZipList a -&gt; m
forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; ZipList a -&gt; b
forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; ZipList a -&gt; b
forall (t :: * -&gt; *).
(forall m. Monoid m =&gt; t m -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; t a -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; t a -&gt; m)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; t a -&gt; a)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; t a -&gt; a)
-&gt; (forall a. t a -&gt; [a])
-&gt; (forall a. t a -&gt; Bool)
-&gt; (forall a. t a -&gt; Int)
-&gt; (forall a. Eq a =&gt; a -&gt; t a -&gt; Bool)
-&gt; (forall a. Ord a =&gt; t a -&gt; a)
-&gt; (forall a. Ord a =&gt; t a -&gt; a)
-&gt; (forall a. Num a =&gt; t a -&gt; a)
-&gt; (forall a. Num a =&gt; t a -&gt; a)
-&gt; Foldable t
product :: forall a. Num a =&gt; ZipList a -&gt; a
$cproduct :: forall a. Num a =&gt; ZipList a -&gt; a
sum :: forall a. Num a =&gt; ZipList a -&gt; a
$csum :: forall a. Num a =&gt; ZipList a -&gt; a
minimum :: forall a. Ord a =&gt; ZipList a -&gt; a
$cminimum :: forall a. Ord a =&gt; ZipList a -&gt; a
maximum :: forall a. Ord a =&gt; ZipList a -&gt; a
$cmaximum :: forall a. Ord a =&gt; ZipList a -&gt; a
elem :: forall a. Eq a =&gt; a -&gt; ZipList a -&gt; Bool
$celem :: forall a. Eq a =&gt; a -&gt; ZipList a -&gt; Bool
length :: forall a. ZipList a -&gt; Int
$clength :: forall a. ZipList a -&gt; Int
null :: forall a. ZipList a -&gt; Bool
$cnull :: forall a. ZipList a -&gt; Bool
toList :: forall a. ZipList a -&gt; [a]
$ctoList :: forall a. ZipList a -&gt; [a]
foldl1 :: forall a. (a -&gt; a -&gt; a) -&gt; ZipList a -&gt; a
$cfoldl1 :: forall a. (a -&gt; a -&gt; a) -&gt; ZipList a -&gt; a
foldr1 :: forall a. (a -&gt; a -&gt; a) -&gt; ZipList a -&gt; a
$cfoldr1 :: forall a. (a -&gt; a -&gt; a) -&gt; ZipList a -&gt; a
foldl' :: forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; ZipList a -&gt; b
$cfoldl' :: forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; ZipList a -&gt; b
foldl :: forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; ZipList a -&gt; b
$cfoldl :: forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; ZipList a -&gt; b
foldr' :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; ZipList a -&gt; b
$cfoldr' :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; ZipList a -&gt; b
foldr :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; ZipList a -&gt; b
$cfoldr :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; ZipList a -&gt; b
foldMap' :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; ZipList a -&gt; m
$cfoldMap' :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; ZipList a -&gt; m
foldMap :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; ZipList a -&gt; m
$cfoldMap :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; ZipList a -&gt; m
fold :: forall m. Monoid m =&gt; ZipList m -&gt; m
$cfold :: forall m. Monoid m =&gt; ZipList m -&gt; m
</span><a href="Data.Foldable.html#Foldable"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Foldable</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.9.0.0</span><span>
</span><span id="line-115"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. ZipList a -&gt; Rep (ZipList a) x)
-&gt; (forall x. Rep (ZipList a) x -&gt; ZipList a)
-&gt; Generic (ZipList a)
forall x. Rep (ZipList a) x -&gt; ZipList a
forall x. ZipList a -&gt; Rep (ZipList a) x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
forall a x. Rep (ZipList a) x -&gt; ZipList a
forall a x. ZipList a -&gt; Rep (ZipList a) x
$cto :: forall a x. Rep (ZipList a) x -&gt; ZipList a
$cfrom :: forall a x. ZipList a -&gt; Rep (ZipList a) x
</span><a href="GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span>  </span><span class="hs-comment">-- ^ @since 4.7.0.0</span><span>
</span><span id="line-116"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall a. ZipList a -&gt; Rep1 ZipList a)
-&gt; (forall a. Rep1 ZipList a -&gt; ZipList a) -&gt; Generic1 ZipList
forall a. Rep1 ZipList a -&gt; ZipList a
forall a. ZipList a -&gt; Rep1 ZipList a
forall k (f :: k -&gt; *).
(forall (a :: k). f a -&gt; Rep1 f a)
-&gt; (forall (a :: k). Rep1 f a -&gt; f a) -&gt; Generic1 f
$cto1 :: forall a. Rep1 ZipList a -&gt; ZipList a
$cfrom1 :: forall a. ZipList a -&gt; Rep1 ZipList a
</span><a href="GHC.Generics.html#Generic1"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic1</span></a></span><span> </span><span class="hs-comment">-- ^ @since 4.7.0.0</span><span>
</span><span id="line-117"></span><span>                           </span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span class="hs-comment">-- See Data.Traversable for Traversable instance due to import loops</span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-121"></span><span class="hs-comment">-- &gt; f &lt;$&gt; ZipList xs1 &lt;*&gt; ... &lt;*&gt; ZipList xsN</span><span>
</span><span id="line-122"></span><span class="hs-comment">-- &gt;     = ZipList (zipWithN f xs1 ... xsN)</span><span>
</span><span id="line-123"></span><span class="hs-comment">--</span><span>
</span><span id="line-124"></span><span class="hs-comment">-- where @zipWithN@ refers to the @zipWith@ function of the appropriate arity</span><span>
</span><span id="line-125"></span><span class="hs-comment">-- (@zipWith@, @zipWith3@, @zipWith4@, ...). For example:</span><span>
</span><span id="line-126"></span><span class="hs-comment">--</span><span>
</span><span id="line-127"></span><span class="hs-comment">-- &gt; (\a b c -&gt; stimes c [a, b]) &lt;$&gt; ZipList &quot;abcd&quot; &lt;*&gt; ZipList &quot;567&quot; &lt;*&gt; ZipList [1..]</span><span>
</span><span id="line-128"></span><span class="hs-comment">-- &gt;     = ZipList (zipWith3 (\a b c -&gt; stimes c [a, b]) &quot;abcd&quot; &quot;567&quot; [1..])</span><span>
</span><span id="line-129"></span><span class="hs-comment">-- &gt;     = ZipList {getZipList = [&quot;a5&quot;,&quot;b6b6&quot;,&quot;c7c7c7&quot;]}</span><span>
</span><span id="line-130"></span><span class="hs-comment">--</span><span>
</span><span id="line-131"></span><span class="hs-comment">-- @since 2.01</span><span>
</span><span id="line-132"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679559059"><span id="local-6989586621679559061"><span id="local-6989586621679559064"><span class="annot"><a href="GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="Control.Applicative.html#ZipList"><span class="hs-identifier hs-type">ZipList</span></a></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-133"></span><span>    </span><span id="local-6989586621679559058"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; ZipList a
</span><a href="GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621679559057"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679559057"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ZipList a
forall a. [a] -&gt; ZipList a
</span><a href="Control.Applicative.html#ZipList"><span class="hs-identifier hs-var">ZipList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; [a]
forall a. a -&gt; [a]
</span><a href="GHC.List.html#repeat"><span class="hs-identifier hs-var">repeat</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679559057"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-134"></span><span>    </span><span id="local-6989586621679559056"><span class="annot"><span class="annottext">liftA2 :: forall a b c. (a -&gt; b -&gt; c) -&gt; ZipList a -&gt; ZipList b -&gt; ZipList c
</span><a href="#local-6989586621679559056"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftA2</span></a></span></span><span> </span><span id="local-6989586621679559055"><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679559055"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Applicative.html#ZipList"><span class="hs-identifier hs-type">ZipList</span></a></span><span> </span><span id="local-6989586621679559054"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679559054"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Applicative.html#ZipList"><span class="hs-identifier hs-type">ZipList</span></a></span><span> </span><span id="local-6989586621679559053"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679559053"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[c] -&gt; ZipList c
forall a. [a] -&gt; ZipList a
</span><a href="Control.Applicative.html#ZipList"><span class="hs-identifier hs-var">ZipList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
forall a b c. (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
</span><a href="GHC.List.html#zipWith"><span class="hs-identifier hs-var">zipWith</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679559055"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679559054"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679559053"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span class="hs-comment">-- | @since 4.11.0.0</span><span>
</span><span id="line-137"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679559045"><span id="local-6989586621679559047"><span class="annot"><a href="GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="annot"><a href="Control.Applicative.html#ZipList"><span class="hs-identifier hs-type">ZipList</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-138"></span><span>   </span><span id="local-6989586621679559044"><span class="annot"><span class="annottext">empty :: forall a. ZipList a
</span><a href="#local-6989586621679559044"><span class="hs-identifier hs-var hs-var hs-var hs-var">empty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ZipList a
forall a. [a] -&gt; ZipList a
</span><a href="Control.Applicative.html#ZipList"><span class="hs-identifier hs-var">ZipList</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-139"></span><span>   </span><span class="annot"><a href="Control.Applicative.html#ZipList"><span class="hs-identifier hs-type">ZipList</span></a></span><span> </span><span id="local-6989586621679559042"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679559042"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span id="local-6989586621679559041"><span class="annot"><span class="annottext">&lt;|&gt; :: forall a. ZipList a -&gt; ZipList a -&gt; ZipList a
</span><a href="#local-6989586621679559041"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;|&gt;</span></a></span></span><span> </span><span class="annot"><a href="Control.Applicative.html#ZipList"><span class="hs-identifier hs-type">ZipList</span></a></span><span> </span><span id="local-6989586621679559040"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679559040"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ZipList a
forall a. [a] -&gt; ZipList a
</span><a href="Control.Applicative.html#ZipList"><span class="hs-identifier hs-var">ZipList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679559042"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; [a]
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679559042"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679559040"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="hs-comment">-- extra functions</span><span>
</span><span id="line-142"></span><span>
</span><span id="line-143"></span><span class="hs-comment">-- | One or none.</span><span>
</span><span id="line-144"></span><span class="hs-comment">--</span><span>
</span><span id="line-145"></span><span class="hs-comment">-- It is useful for modelling any computation that is allowed to fail.</span><span>
</span><span id="line-146"></span><span class="hs-comment">--</span><span>
</span><span id="line-147"></span><span class="hs-comment">-- ==== __Examples__</span><span>
</span><span id="line-148"></span><span class="hs-comment">--</span><span>
</span><span id="line-149"></span><span class="hs-comment">-- Using the 'Alternative' instance of `Control.Monad.Except`, the following functions:</span><span>
</span><span id="line-150"></span><span class="hs-comment">--</span><span>
</span><span id="line-151"></span><span class="hs-comment">-- &gt;&gt;&gt; canFail = throwError &quot;it failed&quot; :: Except String Int</span><span>
</span><span id="line-152"></span><span class="hs-comment">-- &gt;&gt;&gt; final = return 42                :: Except String Int</span><span>
</span><span id="line-153"></span><span class="hs-comment">--</span><span>
</span><span id="line-154"></span><span class="hs-comment">-- Can be combined by allowing the first function to fail:</span><span>
</span><span id="line-155"></span><span class="hs-comment">--</span><span>
</span><span id="line-156"></span><span class="hs-comment">-- &gt;&gt;&gt; runExcept $ canFail *&gt; final</span><span>
</span><span id="line-157"></span><span class="hs-comment">-- Left &quot;it failed&quot;</span><span>
</span><span id="line-158"></span><span class="hs-comment">-- &gt;&gt;&gt; runExcept $ optional canFail *&gt; final</span><span>
</span><span id="line-159"></span><span class="hs-comment">-- Right 42</span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span id="local-6989586621679559481"><span id="local-6989586621679559482"><span class="annot"><a href="Control.Applicative.html#optional"><span class="hs-identifier hs-type">optional</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559482"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679559482"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559481"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679559482"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679559481"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-162"></span><span id="optional"><span class="annot"><span class="annottext">optional :: forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f (Maybe a)
</span><a href="Control.Applicative.html#optional"><span class="hs-identifier hs-var hs-var">optional</span></a></span></span><span> </span><span id="local-6989586621679559030"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679559030"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; Maybe a) -&gt; f a -&gt; f (Maybe a)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679559030"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">f (Maybe a) -&gt; f (Maybe a) -&gt; f (Maybe a)
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; f (Maybe a)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-163"></span></pre></body></html>